// 分页对象 对接后台分页对象
export function pageable () {
  return {
    total: 0,
    size: 20,
    page: 1,
    sort: 'createTime',
    order: 'ASC',
    pageLimits: [10, 20, 50, 100, 200],
    layout: {
      lg: 'total, sizes, prev, pager, next, jumper',
      sm: 'total, prev, pager, next, jumper'
    }
  }
}
// 排序  升序降序 常量
export const sort = {
  DESC: 'DESC', // 降序
  ASC: 'ASC', // 升序
  change: function (column, pageable, call = () => { }) {
    if (column) {
      if (column.order === 'descending') {
        pageable.order = this.DESC
      } else {
        pageable.order = this.ASC
      }
      pageable.sort = column.prop
    }
    call()
  }
}
